package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 【请填写功能名称】对象 base_database
 *
 * @author ruoyi
 * @date 2022-10-20
 */
public class BaseDatabase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 租户ID */
    @Excel(name = "租户ID")
    private String databaseCode;

    /** 数据库连接URL */
    @Excel(name = "数据库连接URL")
    private String url;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 密码 */
    @Excel(name = "密码")
    private String password;

    /** 数据库名 */
    @Excel(name = "数据库名")
    private String databaseName;

    /** 数据库主机名 */
    @Excel(name = "数据库主机名")
    private String hostName;

    /** 状态(1正常 2停止) */
    @Excel(name = "状态(1正常 2停止)")
    private String status;

    /** 到期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setDatabaseCode(String databaseCode)
    {
        this.databaseCode = databaseCode;
    }

    public String getDatabaseCode()
    {
        return databaseCode;
    }
    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getUrl()
    {
        return url;
    }
    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setDatabaseName(String databaseName)
    {
        this.databaseName = databaseName;
    }

    public String getDatabaseName()
    {
        return databaseName;
    }
    public void setHostName(String hostName)
    {
        this.hostName = hostName;
    }

    public String getHostName()
    {
        return hostName;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setExpirationDate(Date expirationDate)
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate()
    {
        return expirationDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("databaseCode", getDatabaseCode())
            .append("url", getUrl())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("databaseName", getDatabaseName())
            .append("hostName", getHostName())
            .append("createTime", getCreateTime())
            .append("status", getStatus())
            .append("expirationDate", getExpirationDate())
            .toString();
    }
}
